package com.zzxz.practicaltrainingsys.service.impl;

import com.zzxz.practicaltrainingsys.entity.School;
import com.zzxz.practicaltrainingsys.mapper.SchoolMapper;
import com.zzxz.practicaltrainingsys.service.SchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SchoolServiceImpl implements SchoolService {
    @Autowired
    private SchoolMapper schoolMapper;

    @Override
    public List<School> getSchool() {
        return schoolMapper.getSchool();
    }

    @Override
    public boolean addSchool(School school) {
        return schoolMapper.addSchool(school) > 0;
    }

    @Override
    public School getSchoolById(Integer school_id) {

        return schoolMapper.getSchoolById(school_id);
    }

    @Override
    public int updateSchool(School school) {
        return schoolMapper.updateSchool(school);
    }


}